import request from '@/utils/request'

// 查询审批流程列表
export function listFlow(query) {
  return request({
    url: '/system/examine_flow/list',
    method: 'get',
    params: query
  })
}

// 查询审批流程详细
export function getFlow(postId) {
  return request({
    url: '/system/examine_flow/' + postId,
    method: 'get'
  })
}

// 新增审批流程
export function addFlow(data) {
  return request({
    url: '/system/examine_flow',
    method: 'post',
    data: data
  })
}

// 修改审批流程
export function updateFlow(data) {
  return request({
    url: '/system/examine_flow',
    method: 'put',
    data: data
  })
}

// 删除审批流程
export function delFlow(postId) {
  return request({
    url: '/system/examine_flow/' + postId,
    method: 'delete'
  })
}

// 用户审核流程信息
export function examineFlow(query) {
  return request({
    url: '/system/examine_flow/user',
    method: 'get',
    params: query
  })
}
